"""
@author: Sergiy Tsymbalyuk
"""

import logging

from pylons.i18n import lazy_ugettext as _

from repoze.what.plugins.pylonshq import ControllerProtector

from chowa.lib.site.crud import FlatCrudController
from hrms.lib.predicates import profile
from hrms.model.worktime import Vacation

log = logging.getLogger(__name__)

@ControllerProtector(profile())
class VacationsController(FlatCrudController):
    __model__ = Vacation
    __main_heading__ = _('Education')
    __columns__ = ['employee', 'type', 'is_financial_aid', 'days',
                   'started', 'ended']
    __edit_columns__ = ['employee', 'type', 'is_financial_aid', 'days',
                        'started', 'ended', 'period_started', 'period_ended']